package com.zhen.interceptor.web;

import com.zhen.interceptor.service.ThreadService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class InterController {
    @Autowired
    ThreadService threadService;
    @PostMapping("/xiaomei")
    public void test() throws InterruptedException {
        log.info("方法开始执行");
        threadService.apply();
    }
    @PostMapping("/sum")
    public void sum() throws InterruptedException {
        log.info("方法开始执行");
        threadService.sum();
    }

    @PostMapping("/sum2")
    public void sum2() throws InterruptedException {
        log.info("方法开始执行");
        threadService.sum2();
    }
}
